<%-- 
    Document   : index
    Created on : 6/04/2013, 07:43:55 PM
    Author     : ceci torres
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import = "model.login" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <H1>LOGIN FORM</H1>
            <%
                String myname = (String) session.getAttribute("username");

                if (myname != null) {
                    out.println("Welcome  " + myname + "  , <a href=\"logout.jsp\" >Logout</a>");
                } else {
            %>
        <form action="login">
            <table>
                <tr>
                    <td> Username  : </td><td> <input name="username" size=15 type="text" /> </td> 
                </tr>
                <tr>
                    <td> Password  : </td><td> <input name="password" size=15 type="text" /> </td> 
                </tr>
            </table>
            <input type="submit" value="login" />
        </form>




        <form name="registro" action="registro.jsp" method="POST" >
            <table>
                <tr>
                    <td>
                        Nombre
                    </td>
                    <td>
                        <input type = "name" name = "realname" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Edad
                    </td>
                    <td>
                        <input type = "age" name = "age" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Genero
                    </td>
                    <td>
                        <input type = "text" name = "gender" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Peso
                    </td>
                    <td>
                        <input type = "text" name = "weight" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Estatura
                    </td>
                    <td>
                        <input type = "text" name = "height" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Email
                    </td>
                    <td>
                        <input type = "text" name = "email" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Nick
                    </td>
                    <td>
                        <input type = "name" name = "nick" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Contraseña
                    </td>
                    <td>
                        <input type = "password" name = "pass" />
                    </td>
                </tr>
                <tr>
                    <td>
                        Repetir contraseña
                    </td>
                    <td>
                        <input type = "password" name = "rpass" />
                    </td>
                </tr>
            </table>
            <input type = "submit" name = "submit" value = "Registrarme" />
            <input type ="reset">
        </form>


    </body>
</html>
